package com.zj.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("hello")
@PropertySource(value = "classpath:/app2.properties", encoding = "UTF-8")

public class Hello3Controller {

    @Value("${com.app.name}")
    private String name;

    @Value("${com.app.address}")
    private String address;

    @Value("${com.app.age}")
    private String age;

    @RequestMapping("world")
    public String hello(){
        return "hello configprofile "+name+" "+address+
                " "+age;
    }
}
